//package com.tang.provider;
//
//import com.alibaba.fastjson.serializer.SerializerFeature;
//import com.alibaba.fastjson.support.config.FastJsonConfig;
//import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
//import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class HttpMessageConverterConfig {
//
//    @Bean
//    public HttpMessageConverters fastJsonConfigure() {
//        FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
//        FastJsonConfig fastJsonConfig = new FastJsonConfig();
//        fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat);
//        //日期格式化
////        fastJsonConfig.setDateFormat("yyyy-MM-dd HH:mm:ss");
//        //修改配置返回内容的过滤
////        fastJsonConfig.setSerializerFeatures(
////                // 消除对同一对象循环引用的问题，默认为false（如果不配置有可能会进入死循环）
////                // 循环应用问题请参考https://blog.csdn.net/z714359830/article/details/51527066
////                SerializerFeature.DisableCircularReferenceDetect
////                // 是否输出值为null的字段,默认为false
////                // SerializerFeature.WriteMapNullValue,
////                // Boolean字段如果为null,输出为false,而非null
////                // SerializerFeature.WriteNullBooleanAsFalse,
////                // List字段如果为null,输出为[],而非null
////                // SerializerFeature.WriteNullListAsEmpty,
////                // 字符类型字段如果为null,输出为"",而非null
////                // SerializerFeature.WriteNullStringAsEmpty
////        );
//        converter.setFastJsonConfig(fastJsonConfig);
//        //处理中文乱码问题
////        List<MediaType> fastMediaTypes = new ArrayList<>();
////        fastMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
////        converter.setSupportedMediaTypes(fastMediaTypes);
//        return new HttpMessageConverters(converter);
//    }
//
//
//}
